package com.erp.organization.dao.idl;

import java.util.BitSet;
import java.util.Map;
import java.util.Set;

import com.paipai.lang.uint16_t;
import com.paipai.lang.uint32_t;
import com.paipai.lang.uint64_t;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.Member;

/**
 * 云ERP组织机构信息系统，组织机构dao的ddo
 * 
 * @author hadeswang
 * @version 1.0, 2013-10-12
 * 
 */

public class OrganizationDdo
{
	/**
	 * 
	 * 分支机构DDO
	 * 
	 * @author hadeswang
	 * 
	 */
	@Member(cPlusNamespace = "erp::organization::ddo", desc = "分支机构DDO", isNeedUFlag = true)
	public class BranchDdo
	{
		@Field(desc = "版本号  ", defaultValue = "0", optional = true)
		uint32_t version;
		
		@Field(desc = "分支机构SysNo", optional = true)
		uint64_t branchSysNo;
		
		@Field(desc = "父分支机构SysNo", optional = true)
		uint64_t parentBranchSysNo;
		
		@Field(desc = "分支全称", optional = true)
		String fullName;
		
		@Field(desc = "分支简称", optional = true)
		String branchName;
		
		@Field(desc = "分支编码", optional = true)
		String branchID;
		
		@Field(desc = "备注", optional = true)
		String comment;
		
		@Field(desc = "拼音码", optional = true)
		String pyCode;
		
		@Field(desc = "适用价格Level", optional = true)
		uint16_t prebuyPriceLevel;
		
		@Field(desc = "联系人", optional = true)
		String contact;
		
		@Field(desc = "电话", optional = true)
		String phone;
		
		@Field(desc = "邮编", optional = true)
		String zipCode;
		
		@Field(desc = "地址", optional = true)
		String address;
		
		@Field(desc = "银行户名", optional = true)
		String bankAccountName;
		
		@Field(desc = "银行账号", optional = true)
		String bankAccount;
		
		@Field(desc = "税号", optional = true)
		String taxID;
		
		@Field(desc = "核算全名", optional = true)
		String accoutName;
		
		@Field(desc = "核算模式Enum", optional = true)
		uint16_t acountMode;
		
		@Field(desc = "机构属性,只读", bitset = 32, optional = true)
		BitSet branchProperty;
		
		@Field(desc = "机构属性,设置", bitset = 32, optional = true)
		BitSet branchPropertyInclude;
		
		@Field(desc = "机构属性,取消", bitset = 32, optional = true)
		BitSet branchPropertyExclude;
		
		@Field(desc = "机构状态", optional = true)
		uint32_t branchStatus;
		
		@Field(desc = "创建人SysNo", optional = true)
		uint64_t creatorSysNo;
		
		@Field(desc = "创建时间", optional = true)
		uint32_t rowCreatDate;
		
		@Field(desc = "编辑者SysNo", optional = true)
		uint64_t modifierSysNo;
		
		@Field(desc = "编辑时间", optional = true)
		uint32_t rowModifyDate;
	}

	/**
	 * 
	 * 组织机构Filter
	 * 
	 * @author hadeswang
	 * 
	 */
	@Member(cPlusNamespace = "erp::organization::ddo", desc = "分支机构Filter", isNeedUFlag = true)
	public class OrganizationFilterDdo
	{
		@Field(desc = "版本号", defaultValue = "0", optional = true)
		uint32_t version;

		@Field(desc = "页码，从0开始，必填", optional = true)
		uint32_t page;

		@Field(desc = "页面大小，服务通过配置进行最大值限制，必填", optional = true)
		uint32_t pageSize;

		@Field(desc = "排序方式，参见相关枚举定义，必填", optional = true)
		uint32_t orderType;

		@Field(desc = "父分支机构ID", optional = true)
		Set<uint32_t> parentId;

		@Field(desc = "分支机构全称", optional = true)
		String fullName;

		@Field(desc = "分支机构简称", optional = true)
		String name;

		@Field(desc = "分支机构编码", optional = true)
		String code;

		@Field(desc = "分支机构拼音码", optional = true)
		String pinyinCode;

		@Field(desc = "状态", optional = true)
		Set<uint16_t> status;

		@Field(desc = "包含属性，且或关系由PropertyOption指定", bitset = 32, optional = true)
		BitSet propertyInclude;

		@Field(desc = "包含属性选项：0：且的关系；1，或的关系", optional = true)
		uint16_t propertyOption;

		@Field(desc = "排除属性，与PropertyInclude为且关系 ", bitset = 32, optional = true)
		BitSet propertyExclude;

		@Field(desc = "扩展")
		Map<String, String> extern;
	}
}
